home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Programming / Complete Applications / 4D Programming / External Procedures / Soundex Stuff / Soundex.docs < prev    next >
Encoding:
Text File  |  1987-09-24  |  1.4 KB  |  44 lines  |  [TEXT/ttxt]

  1. This document describes the Soundex utility.
  2.  
  3. Contained in this packed file are:
  4.  
  5. Soundex.p          Soundex source code.
  6. Soundex            Soundex application
  7. Soundex.docs    This document
  8.  
  9. To install soundex follow this procedure:
  10.  
  11. Start 4D External mover.
  12. Select the .ext or .res file in which you want to install Soundex.
  13. Click transfer.
  14. Accept the defaults, Segment 1, Offset 4.
  15. Click on the String parameter.  This is the only parameter required.
  16. Close and Quit.
  17. Now Soundex is installed and ready to be used.
  18.  
  19. To call soundex, you pass a string containing the name and the Soundex code is returned in the same variable that was sent.
  20.  
  21. myvar:="Todd"
  22. Soundex(myvar)
  23. `Now myvar contains the Soundex code for "Todd"
  24.  
  25. To allow very fast searches with Soundex, it is best to create a field, make it indexed, and then in the after phase of the input layout, call Soundex and store the returned code in the indexed field.
  26.  
  27. When using Soundex, you must make a good guess at the name for which you are searching  AND  you must have the first character correct.
  28.  
  29. Here's how the routine works:
  30.  
  31. First character is preserved.
  32. All characters are assigned a value.
  33. Wherever a sound code is next to the same code, remove one of them.
  34. Strip all vowels.  (I assign vowels to be code zero)
  35. Keep first three digits.
  36. If fewer than three digits then append zero's.
  37. Append code to first character sent.
  38. Return code in the format  A999.
  39.  
  40. That's all.
  41.  
  42. Todd.
  43. ACIUS.
  44.